package com.itheima.reggie.service;

import com.itheima.reggie.entity.AddressBook;
import com.itheima.reggie.entity.R;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface AddressBookService {
    void save(AddressBook addressBook);

    R<List<AddressBook>> findAll(Long userId);

    // @Transactional
    void updateDefault(AddressBook addressBook);

    R<AddressBook> findById(Long id);

    void update(AddressBook addressBook);

    void delete(Long ids);

    AddressBook getDefaultAddress(Long userId);
}
